import { setToken, getToken, delToken } from '@/utils/storage'

export default {
  namespaced: true,
  state: {
    token: getToken()
  },
  getters: {},
  mutations: {
    // 添加token
    setUserToken(state, token) {
      console.log(token)
      setToken(token)
      state.token = token
    },
    // 删除toekn
    delToken(state) {
      state.token = null
      delToken()
    }
  },
  actions: {},
  modules: {}
}
